package javango.core;

import javango.api.Urls;

import com.google.inject.Inject;
import com.google.inject.Injector;

public class SubappUrlFactory {

	/* guice assisted inject does not seem to support the <? extends Urls> generics for the urlsClass param..  for now just an old fashoined factory 
	 * maybe one day i'll figure out how to make this assisted
	 * */	
	private final Injector injector;
	
	public SubappUrl create(String pattern, Class<? extends Urls> urlsClass) {
		return new SubappUrl(injector, pattern, urlsClass);
	}	

	@Inject
	public SubappUrlFactory(Injector injector) {
		super();
		this.injector = injector;
	}
}
